
CC = mpicc

SRCS = reader.c \
            writer.c

OBJS = $(SRCS:.c=.o)

CCFLAGS = -g -I/export/home/yyin/install/include -I/usr/local/BerkeleyDB.4.3/include/
LDFLAGS = -L/usr/local/BerkeleyDB.4.3/lib -ldb 

all: reader writer

reader: $(OBJS)
	$(CC) $(CCFLAGS) $(LDFLAGS) -o reader reader.o 

writer: $(OBJS)
	$(CC) $(CCFLAGS) $(LDFLAGS) -o writer writer.o 

.c.o: 
	$(CC) $(CCFLAGS) -c $<

clean:
	-rm -f $(OBJS) reader writer my.db


